{
  "network": {
    "node_to_node_interface": { "bind_address": "{{ node_address }}", "published_address": "{{ published_node_address }}" },
    "rpc_interfaces": {{ rpc_interfaces|tojson }}
  },
  "node_certificate":
  {
    "subject_name": "{{ subject_name }}",
    "subject_alt_names": {{ subject_alt_names|tojson }},
    "curve_id": "{{ curve_id }}",
    "initial_validity_days": {{ initial_node_cert_validity_days }}
  },
  "node_data_json_file": {{ node_data_json_file|tojson }},
  "attestation":
  {
    "snp_endorsements_servers": {{ snp_endorsements_servers|tojson }},
    "snp_security_policy_file": "{{ snp_security_policy_file }}",
    "snp_uvm_endorsements_file": "{{ snp_uvm_endorsements_file }}",
    "snp_endorsements_file": "{{ snp_endorsements_file }}"
  },
  "service_data_json_file": {{ service_data_json_file|tojson }},
  "command": {
    "type": "{{ start_type }}",
    "service_certificate_file": "{{ service_cert_file }}",
    "start":
    {
      "members": {{ members_info|tojson }},
      "constitution_files": {{ constitution|tojson }},
      "service_configuration":
      {
        "recovery_threshold": {{ recovery_threshold or 0 }},
        "maximum_node_certificate_validity_days": {{ maximum_node_certificate_validity_days }},
        "maximum_service_certificate_validity_days": {{ maximum_service_certificate_validity_days }}
      },
      "initial_service_certificate_validity_days": {{ initial_service_cert_validity_days }},
      "service_subject_name": {{ service_subject_name|tojson }},
      "cose_signatures":
      {
        "issuer": {{ cose_signatures_issuer|tojson }},
        "subject": {{ cose_signatures_subject|tojson }}
      }
    },
    "join":
    {
      "retry_timeout": "{{ join_timer }}",
      "target_rpc_address": "{{ target_rpc_address }}",
      "follow_redirect": {{ follow_redirect|tojson }},
      "fetch_recent_snapshot": {{ fetch_recent_snapshot|tojson }}
    },
    "recover": {
      "initial_service_certificate_validity_days": {{ initial_service_cert_validity_days }},
      {% if previous_sealed_ledger_secret_location %}
        "previous_sealed_ledger_secret_location": "{{ previous_sealed_ledger_secret_location }}",
      {% endif %}
      "previous_service_identity_file": "{{ previous_service_identity_file }}"
    }
  },
  "ledger":
  {
    "directory": "{{ ledger_dir }}",
    "read_only_directories": {{ read_only_ledger_dirs|tojson }},
    "chunk_size": "{{ ledger_chunk_bytes }}"
  },
  "snapshots":
  {
    "directory": "{{ snapshots_dir }}",
    "tx_count": {{ snapshot_tx_interval }},
    "read_only_directory": {{ read_only_snapshots_dir|tojson }}
  },
  "logging":
  {
    "host_level": "{{ host_log_level }}",
    "format": "Text"
  },
  "consensus":
  {
    "message_timeout": "{{ message_timeout }}",
    "election_timeout": "{{ election_timeout }}",
    "max_uncommitted_tx_count": {{ max_uncommitted_tx_count|tojson or 0 }}
  },
  "ledger_signatures":
  {
    "tx_count": {{ sig_tx_interval }},
    "delay": "{{ signature_interval_duration }}"
  },
  "jwt":
  {
    "key_refresh_interval": "{{ jwt_key_refresh_interval }}"
  },
  "output_files": {
    "node_certificate_file": "{{ node_certificate_file or "node.pem" }}",
    "pid_file": "{{ node_pid_file or "node.pid" }}",
    "node_to_node_address_file": "{{ node_address_file }}",
    {% if sealed_ledger_secret_location %}
      "sealed_ledger_secret_location": "{{ sealed_ledger_secret_location }}",
    {% endif %}
    "rpc_addresses_file" : "{{ rpc_addresses_file }}"
  },
  "tick_interval": "{{ tick_ms }}ms",
  "slow_io_logging_threshold": "10ms",
  "client_connection_timeout": "2s"{% if idle_connection_timeout_s %},
  "idle_connection_timeout": "{{ idle_connection_timeout_s }}s"{% endif %},
  "node_client_interface": {{ node_client_interface|tojson }},
  "worker_threads": {{ worker_threads }},
  "memory": {
    "circuit_size": "16MB",
    "max_msg_size": "{{ max_msg_size_bytes }}",
    "max_fragment_size": "256KB"
  },
  "ignore_first_sigterm": {{ ignore_first_sigterm|tojson }}{% if node_to_node_message_limit %},
  "node_to_node_message_limit": {{ node_to_node_message_limit|tojson }}{% endif %}{% if historical_cache_soft_limit %},
  "historical_cache_soft_limit": {{ historical_cache_soft_limit|tojson }}{% endif %}
}